package com.xiaohong.user.fallback;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaohong.user.feign.ChatUsernameListFeign;
import com.xiaohong.user.feign.ChatUsernameListFeign;
import com.xiaohong.user.pojo.UsernameList;
import entity.Result;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Component
public class ChatUsernameListFallback implements ChatUsernameListFeign {
    /***
     * 分页条件搜索实现UsernameList
     * @param UsernameList
     * @param page
     * @param size
     * @return
     */
    public Result<Page> findPage(@RequestBody(required = false) UsernameList UsernameList, @PathVariable int page, @PathVariable  int size){
        System.out.println("UsernameListFallback的findPage方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+ UsernameList+"和"+page+"和"+size);
        return null;
    };

    /***
     * 分页搜索实现UsernameList
     * @param page:当前页
     * @param size:每页显示多少条
     * @return
     */
    public Result<Page> findPage(@PathVariable  int page, @PathVariable  int size){
        System.out.println("UsernameListFallback的findPage方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+page+"和"+size);
        return null;
    }

    /***
     * 多条件搜索UsernameList数据
     * @param UsernameList
     * @return
     */
    public Result<List<UsernameList>> findList(@RequestBody(required = false) UsernameList UsernameList){
        System.out.println("UsernameListFallback的findList方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+UsernameList);
        return null;
    }

    /***
     * 根据Id删除UsernameList数据
     * @param id
     * @return
     */
    public Result delete(@PathVariable Long id){
        System.out.println("UsernameListFallback的delete方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+id);
        return null;
    }

    /***
     * 根据ID修改UsernameList数据
     * @param UsernameList
     * @return
     */
    public Result update(@RequestBody UsernameList UsernameList){
        System.out.println("UsernameListFallback的update方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+UsernameList);
        return null;
    }

    /***
     * 新增UsernameList数据
     * @param UsernameList
     * @return
     */
    public Result add(@RequestBody UsernameList UsernameList){
        System.out.println("UsernameListFallback的add方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+UsernameList);
        return null;
    }

    /***
     * 根据ID查询UsernameList数据
     * @param id
     * @return
     */
    public Result<UsernameList> findById(@PathVariable Long id){
        System.out.println("UsernameListFallback的findById方法错误，错误日志已保存数据库了哦");
        System.out.println("数据:"+id);
        return null;
    }

    /***
     * 查询UsernameList全部数据
     * @return
     */
    public Result<List<UsernameList>> findAll(){
        System.out.println("UsernameListFallback的findAll方法错误，错误日志已保存数据库了哦");
        return null;
    }
}
